package com.moxi.mougblog.base.result;

import lombok.Getter;

/**
 * 响应码枚举
 *
 * @author LiShuai
 * @date 2020/5/30 23:46
 */
@Getter
public enum ResultCode {

    /**
     * 规范响应体中的响应码和响应信息
     */
    SUCCESS(200, "操作成功"),

    FAILED(500, "响应失败"),

    VALIDATE_FAILED(501, "参数校验失败"),

    ERROR(502, "未知错误"),

    ERROR_FEIGN(520, "Redis熔断器启动了----Redis暂未启动"),

    ;

    private Integer code;
    private String msg;

    ResultCode(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

}
